var videoplayer=cc.Class({
    extends: cc.Component,

    properties: {
        // foo: {
        //    default: null,      // The default value will be used only when the component attaching
        //                           to a node for the first time
        //    url: cc.Texture2D,  // optional, default is typeof default
        //    serializable: true, // optional, default is true
        //    visible: true,      // optional, default is true
        //    displayName: 'Foo', // optional
        //    readonly: false,    // optional, default is false
        // },
        // ...
    },
    statics: {
        init: null
    },

    // use this for initialization
    onLoad: function () {
        videoplayer.init = this; 
    },
//  playMusicRomote: function(clipurl) {
//     cc.log(this.name);
//     this.player.resourceType = 0;
//     this.player.remoteURL = clipurl;
//     this.player.play();
//   },
  playMusicLocal: function(filepath) {
    cc.log(this.node.getComponent(cc.VideoPlayer).resourceType+filepath);
    this.node.getComponent(cc.VideoPlayer).resourceType = 1;
    this.node.getComponent(cc.VideoPlayer).clip = filepath;
    this.node.getComponent(cc.VideoPlayer).play();
    cc.log(this.node.getComponent(cc.VideoPlayer).resourceType+filepath);
  }, 
//   stopMusic: function() {
//     this.player.stop();
//   },
    // called every frame, uncomment this function to activate update callback
    // update: function (dt) {

    // },
});
